# -*- coding: utf-8 -*-

"""
DateTime   : 2021/04/11 17:15
Author     : ZhangYafei
Description: 
"""
import json


str1 = '{"name": "zhang", "age": 10}'


print(type(str1))

# 字符串转字典
dict1 = json.loads(str1)

print(type(dict1))

print(dict1['name'])

# 字典转字符串
str2 = json.dumps(dict1)
print(type(str2))


